package com.zhaopin.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/hello")
public class HelloController {

    @Value("${abc}")
    private String abc;

    @RequestMapping("/world")
    @ResponseBody
    public String hello(){
        return "hello world";
    }

    @RequestMapping("/myname")
    @ResponseBody
    public String hello1(String name){
        return "hello " + name + "!";
    }

    @RequestMapping("/properties")
    @ResponseBody
    public String proper(){
        return abc;
    }
}
